********************************************************************************
* Conflict Avoidance and Gender Gaps in Political Engagement
* Jennifer Wolak
* Political Behavior
* replication models
********************************************************************************

* MODELS REPORTED IN MANUSCRIPT

svyset [pweight=weight]

* TABLE 1
*****************************************
svy: nbreg newsuse conlike conhate educ spid age female black latino
svy: regress folpol conlike conhate educ spid age female black latino
svy: regress lfolpol conlike conhate educ spid age female black latino
svy: regress ltalkpol conlike conhate educ spid age female black latino
svy: regress rntalk conlike conhate educ spid age female black latino

* TABLE 2
*****************************************
svy: logit vvote conlike conhate educ spid pcont age female black latino
svy: logit pasign conlike conhate educ spid pcont age female black latino 
svy: logit pawork conlike conhate educ spid pcont age female black latino
svy: logit padonate conlike conhate educ spid pcont age female black latino
svy: logit pameet conlike conhate educ spid pcont age female black latino
svy: logit runoffice conlike conhate educ spid pcont age female black latino

* FIGURE 1
******************************************
mean conlike [pweight=weight], over(female)
test [conlike]0 = [conlike]1
mean conhate [pweight=weight], over(female)
test [conhate]0 = [conhate]1

* TABLE 3
*****************************************
medeff (regress conlike conhate educ spid age female black latino) (regress newsuse conlike conhate educ spid age female black latino) [pweight=weight], treat(female) mediate(conlike) 
medeff (regress conlike conhate educ spid age female black latino) (regress folpol conlike conhate educ spid age female black latino) [pweight=weight], treat(female) mediate(conlike) 
medeff (regress conlike conhate educ spid age female black latino) (regress lfolpol conlike conhate educ spid age female black latino) [pweight=weight], treat(female) mediate(conlike) 
medeff (regress conlike conhate educ spid age female black latino) (regress ltalkpol conlike conhate educ spid age female black latino) [pweight=weight], treat(female) mediate(conlike) 
medeff (regress conlike conhate educ spid age female black latino) (regress rntalk conlike conhate educ spid age female black latino) [pweight=weight], treat(female) mediate(conlike) 

* TABLE 4
*****************************************
medeff (regress conlike conhate educ spid pcont age female black latino) (logit vvote conlike conhate educ spid pcont age female black latino) [pweight=weight], treat(female) mediate(conlike) 
medeff (regress conlike conhate educ spid pcont age female black latino) (logit pasign conlike conhate educ spid pcont age female black latino) [pweight=weight], treat(female) mediate(conlike) 
medeff (regress conlike conhate educ spid pcont age female black latino) (logit pawork conlike conhate educ spid pcont age female black latino) [pweight=weight], treat(female) mediate(conlike) 
medeff (regress conlike conhate educ spid pcont age female black latino) (logit padonate conlike conhate educ spid pcont age female black latino) [pweight=weight], treat(female) mediate(conlike) 
medeff (regress conlike conhate educ spid pcont age female black latino) (logit pameet conlike conhate educ spid pcont age female black latino) [pweight=weight], treat(female) mediate(conlike) 
medeff (regress conlike conhate educ spid pcont age female black latino) (logit runoffice conlike conhate educ spid pcont age female black latino) [pweight=weight], treat(female) mediate(conlike) 

* TABLE A1 & FIGURE A1
*****************************************
factor cav1 cav2 cav3 cav4
fapara, reps(10)
rotate, promax


********************************************************************************
* MODELS REPORTED IN SUPPLEMENTAL APPENDIX

* FIGURE A1
*****************************************
scatter conhate conlike, jitter(7)

* SENSITIVITY ANALYSES FROM MEDIATION MODELS
*****************************************
medsens (regress conlike conhate educ spid age female black latino) (regress folpol conlike conhate educ spid age female black latino), treat(female) mediate(conlike) sims(1000) graph
drop _med_rho _med_delta0 _med_updelta0 _med_lodelta0 _med_delta1 _med_updelta1 _med_lodelta1
medsens (regress conlike conhate educ spid age female black latino) (regress lfolpol conlike conhate educ spid age female black latino), treat(female) mediate(conlike) sims(1000) graph
drop _med_rho _med_delta0 _med_updelta0 _med_lodelta0 _med_delta1 _med_updelta1 _med_lodelta1
medsens (regress conlike conhate educ spid age female black latino) (regress ltalkpol conlike conhate educ spid age female black latino), treat(female) mediate(conlike) sims(1000) graph
drop _med_rho _med_delta0 _med_updelta0 _med_lodelta0 _med_delta1 _med_updelta1 _med_lodelta1
medsens (regress conlike conhate educ spid age female black latino) (regress rntalk conlike conhate educ spid age female black latino), treat(female) mediate(conlike) sims(1000) graph
drop _med_rho _med_delta0 _med_updelta0 _med_lodelta0 _med_delta1 _med_updelta1 _med_lodelta1

medsens (regress conlike conhate educ spid pcont age female black latino) (logit pasign conlike conhate educ spid pcont age female black latino), treat(female) mediate(conlike) sims(1000) graph
drop _med_rho _med_delta0 _med_updelta0 _med_lodelta0 _med_delta1 _med_updelta1 _med_lodelta1
medsens (regress conlike conhate educ spid pcont age female black latino) (logit pawork conlike conhate educ spid pcont age female black latino), treat(female) mediate(conlike) sims(1000) graph
drop _med_rho _med_delta0 _med_updelta0 _med_lodelta0 _med_delta1 _med_updelta1 _med_lodelta1
medsens (regress conlike conhate educ spid pcont age female black latino) (logit pameet conlike conhate educ spid pcont age female black latino), treat(female) mediate(conlike) sims(1000) graph
drop _med_rho _med_delta0 _med_updelta0 _med_lodelta0 _med_delta1 _med_updelta1 _med_lodelta1
medsens (regress conlike conhate educ spid pcont age female black latino) (logit runoffice conlike conhate educ spid pcont age female black latino), treat(female) mediate(conlike) sims(1000) graph
drop _med_rho _med_delta0 _med_updelta0 _med_lodelta0 _med_delta1 _med_updelta1 _med_lodelta1

* ANALYSIS FROM ACPS DATA IN TABLE A1 AVAILABLE ON REQUEST

* MODERATION MODELS, TABLE A2
*****************************************
svy: nbreg newsuse female##c.conlike female##c.conhate educ spid age black latino
svy: regress folpol female##c.conlike female##c.conhate educ spid age black latino
svy: regress lfolpol female##c.conlike female##c.conhate educ spid age black latino
svy: regress ltalkpol female##c.conlike female##c.conhate educ spid age black latino
svy: regress rntalk female##c.conlike female##c.conhate educ spid age black latino

* MODERATION MODELS, TABLE A3
*****************************************
svy: logit vvote female##c.conlike female##c.conhate educ spid pcont age black latino
svy: logit runoffice female##c.conlike female##c.conhate educ spid pcont age black latino
svy: logit pameet female##c.conlike female##c.conhate educ spid pcont age black latino
svy: logit pasign female##c.conlike female##c.conhate educ spid pcont age black latino 
svy: logit pawork female##c.conlike female##c.conhate educ spid pcont age black latino
svy: logit padonate female##c.conlike female##c.conhate educ spid pcont age black latino
svy: nbreg paction female##c.conlike female##c.conhate educ spid pcont age black latino


